package com.lr.app.service;

import java.io.File;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

@Component
public class AsyncServiceImpl implements AsyncService {
	
	@Override
    @Async("asyncExecutor")
    public void deleteFile(File file,int outTimeOfMilli) {
        try{
            Thread.sleep(outTimeOfMilli);
            file.delete();
        }catch(Exception e){
            e.printStackTrace();
        }

	}
}
